import { useLocation } from "@tanstack/react-router";
import { FC, PropsWithChildren } from "react";
import MainLayout from "./MainLayout";

const AppLayout: FC<PropsWithChildren> = ({ children }) => {
  const location = useLocation();

  if (location.pathname === "/login") {
    return <div>{children}</div>;
  }
  return <MainLayout>{children}</MainLayout>;
};

export default AppLayout;
